Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

exact-segment-intersect

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

exact-segment-intersect

Exactly constructs the intersection of two line segments

  • 2.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.8K
increased by27.77%
Maintainers
1
Weekly downloads
 
Created
Source

exact-segment-intersect

Exactly computes the intersection of a pair of line segments as a homogeneous vector of non-overlapping increasing sequences.

testling badge

build status

Example

var exactIntersect = require("exact-segment-intersect")

var a = [-1,0]
var b = [1,0]
var c = [0,-1]
var d = [0,1]

console.log(exactIntersect(a, b, c, d))

Output:

[ [0], [0], [1] ]

Install

npm install exact-segment-intersect

API

require("exact-segment-intersect")(a,b,c,d)

Exactly computes the intersection of the line segments [a,b] and [c,d]

  • a,b are the vertices of the first segment
  • c,d are the vertices of the second segment

Returns A homogeneous 3 vector encoding the exact point of intersection

Credits

(c) 2014 Mikola Lysenko. MIT License

Keywords

FAQs

Package last updated on 27 May 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc